import request from '@/utils/request'
const api_name = '/ai'

export default {
  
    getResponse(question) {
      return request({
        url: `${api_name}/send?sessionId=`+question.sessionId+'&user='+question.user+'&message='+question.message,
        method: 'post',
        data: question
      })
    },
    
    // 添加一个专门用于聊天的请求方法，不显示错误提示
    getResponseWithoutMessage(question) {
      return request({
        url: `${api_name}/send?sessionId=`+question.sessionId+'&user='+question.user+'&message='+question.message,
        method: 'post',
        data: question,
        showError: false // 添加一个标志，表示不显示错误信息
      })
    }
}